package com.wz.project.position.code.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.wz.project.position.code.mapper.PositionCodeMapper;
import com.wz.project.position.code.domain.PositionCode;
import com.wz.project.position.code.service.IPositionCodeService;
import com.wz.common.utils.text.Convert;

/**
 * 车间站点配置Service业务层处理
 * 
 * @author wz
 * @date 2023-12-13
 */
@Service
public class PositionCodeServiceImpl implements IPositionCodeService 
{
    @Autowired
    private PositionCodeMapper positionCodeMapper;

    /**
     * 查询车间站点配置
     * 
     * @param id 车间站点配置ID
     * @return 车间站点配置
     */
    @Override
    public PositionCode selectPositionCodeById(String id)
    {
        return positionCodeMapper.selectPositionCodeById(id);
    }

    /**
     * 查询车间站点配置列表
     * 
     * @param positionCode 车间站点配置
     * @return 车间站点配置
     */
    @Override
    public List<PositionCode> selectPositionCodeList(PositionCode positionCode)
    {
        return positionCodeMapper.selectPositionCodeList(positionCode);
    }

    /**
     * 新增车间站点配置
     * 
     * @param positionCode 车间站点配置
     * @return 结果
     */
    @Override
    public int insertPositionCode(PositionCode positionCode)
    {
        return positionCodeMapper.insertPositionCode(positionCode);
    }

    /**
     * 修改车间站点配置
     * 
     * @param positionCode 车间站点配置
     * @return 结果
     */
    @Override
    public int updatePositionCode(PositionCode positionCode)
    {
        return positionCodeMapper.updatePositionCode(positionCode);
    }

    /**
     * 删除车间站点配置对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deletePositionCodeByIds(String ids)
    {
        return positionCodeMapper.deletePositionCodeByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除车间站点配置信息
     * 
     * @param id 车间站点配置ID
     * @return 结果
     */
    @Override
    public int deletePositionCodeById(String id)
    {
        return positionCodeMapper.deletePositionCodeById(id);
    }

    @Override
    public PositionCode selectByName(String positionThree) {
        return positionCodeMapper.selectByName(positionThree);
    }

    @Override
    public PositionCode selectByNameAndLx(PositionCode positionCode) {
        return positionCodeMapper.selectByNameAndLx(positionCode);

    }
}
